const service = require('../service/home.service')
class HomeController {
  async getLikeData(ctx, next) {
    // 1. 从数据库查询数据
    const result = await service.getLikeData()
    // 2. 返回数据
    ctx.body = {
      status: 200,
      data: result
    }
    await next()
  }
}

module.exports = new HomeController()